The present disclosure relates to relational databases, and more specifically, to building an index structure for a relational database table that includes JSON documents and for querying the same.
A relational database (RDB) is a database which represents various entities in the real world, as well as various relationships between entities using a relational model and is built based on such relational model. The RDB is a widely used type of database. The RDB stores data in the form of tables and uses a standard data query language (SQL) to execute data queries.
With the rise of Internet web 2.0 websites, non-relational databases, also called NoSQL (Not only SQL), are becoming more widely used for network data access. Compared with conventional RDB management systems (RDBMSs), NoSQL is not limited to fixed table structures, and thus has more flexible data storage formats. Correspondingly, NoSQL does not use the SQL language as a main query language. NoSQL has a distributed flexible architecture to achieve high extensibility and high availability. Furthermore, NoSQL is capable of effectively storing large amounts of data, as well as processing a large number of read-write access requests with high concurrency.
In order to make RDBs more flexibly support various forms of data storage such as the NoSQL, it has been proposed to introduce JSON documents in the RDB. JSON (JavaScript Object Notation) is a lightweight data exchange format. JSON uses a text format which is totally independent of the language, so it is easy for developers to read and compile, lends itself well for machine parsing and generating and, thus, is regarded as an ideal data exchange language. By introducing JSON documents, a plurality of objects may be recorded in an item of a table so as to extend the recording capacity of RDBs.